package com.xbfinal.reggie.common;


/**
 * 基于ThreadLocal封装的工具类
 * 一个线程是一个作用域
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal =
             new ThreadLocal<>();

    public static void setCurrentId(long id) {
        threadLocal.set(id);
    }
    public static long getCurrentId() {
        return threadLocal.get();
    }
}
